<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>动态处理响应式数据</p>
        <ul v-for="item in list">
            <li>{{item}}</li>
        </ul>
        <div>{{info.name}}</div>
        <div>{{info.age}}</div>
        <div>{{info.gender}}</div>
    </div>
</body>
<script src="js/vue.js"></script>
<script>
    var vm = new Vue({
        el:'#app',
        data:{
            list:['orang','banana','apple'],
            info:{
                name:'list',
                age:12
            }
        },
        methods: {
            
        },

    });
    // vm.list[1] = 'lemon'
    // 三个参数对应的是：被处理的列表 索引值 赋值的结果
    // Vue.set(vm.list,2,'lemon')
    vm.$set(vm.list,2,'hhhhh')
    // 操作对象
    // vm.info.gender = 'male'
    vm.$set(vm.info,'gender','male')

</script>
</html>